﻿Imports System.Collections.Generic
Imports System.Linq
Imports System.Text

Public NotInheritable Class ClsStatic
    Private Sub New()
    End Sub


    'メールサーバに接続タイムアウト時間
    Public Const defaultTimeOut As Integer = 60000
    '既読メールを削除するか
    Public Shared isDelete As Boolean = False

    '********************************
    'イベントID
    '********************************
    Public Structure EventID
        Public Const SuccessAudit As Integer = 1000
        Public Const Warning As Integer = 1001
        Public Const Err As Integer = 1002
    End Structure

    '********************************
    'イベントログ
    '********************************
    Public Structure MSG_EVENTLOG
        Public Const SERVICES_START As String = "メーラーサービス開始"
        Public Const SERVICES_STOP As String = "メーラーサービス停止"
        Public Const SETTINGS_FILE_NOTEXIST As String = "設定ファイルが存在しない"
        Public Const SETTINGS_READ_ERR As String = "設定ファイルの読込失敗"
        Public Const SETTINGS_READ_UID_ERR As String = "UIDファイルの読込失敗"
        Public Const SETTINGS_CHECK_ERR As String = "設定ファイルの整合性チェック失敗"
        Public Const SETTINGS_PASSWORD_Decrypt_ERR As String = "設定ファイルのパスワードの復号化失敗"
        Public Const SETTINGS_PASSWORD_Encrypt_ERR As String = "設定ファイルのパスワードの暗号化失敗"

        '↓ ADD AT 2014/01/23 BY SHIN (仕様変更：パスフレーズ暗号化追加)
        Public Const SETTINGS_Passphrase_Decrypt_ERR As String = "設定ファイルのパスフレーズの復号化失敗"
        Public Const SETTINGS_Passphrase_Encrypt_ERR As String = "設定ファイルのパスフレーズの暗号化失敗"
        '↑ ADD AT 2014/01/23 BY SHIN (仕様変更：パスフレーズ暗号化追加)

        Public Const MAILSERVER_CONNECT_ERR As String = "メールサーバに接続失敗"
        Public Const MAILSERVER_CONNECT_ERR_N As String = "メールサーバに接続失敗：{0}回目"
        Public Const MAILSERVER_LOGIN_ERR As String = "メールサーバにログイン失敗"
        Public Const MAILSERVER_LOGIN_ERR_N As String = "メールサーバにログイン失敗：{0}回目"

        Public Const MAILSERVER_RECEIPT_ERR As String = "メール{0}受信失敗"
        Public Const MAILSERVER_RECEIPT_ERR_N As String = "メール{0}受信失敗：{1}回目"

        Public Const APPLICATION_NOTEXIST As String = "アプリケーション{0}が設定ファイルに存在しない"

        Public Const DECRYPT_KEY_NOTEXIST As String = "暗号化キー{0}が設定ファイルに存在しない"
        Public Const DECRYPT_FILE_NOTEXIST As String = "暗号化キー{0}の復号化キーファイルが存在しない"
        Public Const DECRYPT_ERR As String = "暗号化キー{0}のユーザIDの復号化失敗"
        Public Const MAILSERVER_SEND_ERR As String = "{0}の送信失敗"
        Public Const MAILSERVER_SEND_ERR_N As String = "{0}の送信失敗：{1}回目"
        Public Const MAILSERVER_Undeliverable As String = "{0}の送信エラー（宛先不明）"
        'Public Const MAILSERVER_DB_ERR As String = "DB取込み機能異常"
        Public Const MAILSERVER_DELE_ERR As String = "{0}の削除マークを付け、既読失敗"
        Public Const MAILSERVER_DELE_ERR_N As String = "{0}の削除マークを付け、既読失敗：{1}回目"
        Public Const DATA_BACKUP_ERR As String = "バックアップ失敗"
        Public Const SETTINGS_SAVE_ERR As String = "設定ファイルの保存失敗"
        Public Const UID_SAVE_ERR As String = "UIDファイルの保存失敗"

        Public Const MAILSERVER_MYSELFSEND_OK As String = "正常（受信）"
        Public Const MAILSERVER_MYSELFSEND_ERR As String = "エラー（未受信）"

        Public Const MAILSERVER_CONTINUING_ERR As String = "（継続中）"
    End Structure

    '********************************
    ' チェックメッセージ
    '********************************
    Public Structure MSG_CHECK
        Public Const OMIT As String = "省略不可"
        Public Const EN As String = "全角半角混在不可"
        Public Const DATAOVER As String = "以内で設定してください"
        Public Const TYPEERR As String = "入力内容の形式が正しくありません"
    End Structure

    '********************************
    ' パス情報
    '********************************
    Public Structure INFO_PATH
        Public Const SETTINGS As String = "config\feed.config"
        Public Const SETTINGS_UID As String = "config\uid.config"
        Public Const LOG As String = "logs\"
        Public Const CSV As String = "mailData\"
        Public Const Attachments As String = "attachments\"
    End Structure

    '********************************
    ' その他情報
    '********************************
    Public Structure INFO_OTHERS
        Public Const MyselfSystemName As String = "自分宛にメール"
        Public Const ToMyselfMailTitle As String = "メールサーバー監視用メール"
        Public Const ResultDecrypt As String = "復号化結果"
        Public Const MailBody As String = "メール本文"
        Public Const Encrypted As String = "Encrypted:"
        Public Const TrashMail As String = "ゴミメール"
    End Structure

End Class
